<template>
	<view class="padding30 fs28">
		<view class="h188 radius20 padding30 bg-f">
			<view class="u-border-bottom pb30 flex row-between" @click="btnTell">
				<text>客服电话</text>
				<text class="fs24 color9">{{config.kefu_iphone}}</text>
			</view>
			<view class="mt30 flex row-between" @click="btnWx">
				<text>客服微信</text>
				<text class="fs24 color9">{{config.kefu_wechat}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config:uni.getStorageSync('config')
			};
		},
		methods:{
			btnTell () {
				let that = this
				uni.showModal({
				    title: '提示',
				    content: '是否拨打客服电话?',
					confirmText:'拨打',
				    success: function (res) {
				        if (res.confirm) {
				            console.log('用户点击确定');
							that.$tool.phone(that.config.kefu_wechat)
				        } else if (res.cancel) {
				            console.log('用户点击取消');
				        }
				    }
				});
			},
			btnWx () {
				let that = this
				uni.showModal({
				    title: '提示',
				    content: '是否复制客服微信?',
					confirmText:'复制',
				    success: function (res) {
				        if (res.confirm) {
				            console.log('用户点击确定');
							that.$tool.copy(that.config.kefu_iphone)
				        } else if (res.cancel) {
				            console.log('用户点击取消');
				        }
				    }
				});
			}
		}
	}
</script>

<style lang="scss">

</style>
